package com.easidea.tim.test.service.inventory;

import java.util.Map;

import org.junit.Test;

import com.easidea.tim.service.inventory.StorageService;
import com.easidea.tim.test.SpringIntegrationTestCase;

public class StorageServiceTestCase extends SpringIntegrationTestCase{

	private StorageService storageService;
	
	/**
	 * @return the storageService
	 */
	public StorageService getStorageService() {
		return storageService;
	}

	/**
	 * @param storageService the storageService to set
	 */
	public void setStorageService(StorageService storageService) {
		this.storageService = storageService;
	}
	
	

//	@Test
//	public void testListProductStorage() {
//		assertNotNull(storageService);
//		Page page = new Page();
//		storageService.listProductStorage(null, null,null, page, true);
//	}

	@Test
	public void testGetStorageSummary(){
		assertNotNull(storageService);
		Map<String, Double> sumMap = storageService.getStorageSummary();
		assertNotNull(sumMap);
	}
	
	@Test
	public void testSampleStorageLimitation(){
		assertNotNull(storageService);
		assertNotNull(storageService.getStorageDao());
		assertTrue(storageService.getStorageDao().getSampleStorageMeterLimitation() == 30d);
	}
}
